<?php echo form::open(); ?>
From: <?php echo form::dropdown('from',$fromUsers,$fromUserSelected); ?>
To: <?php echo form::dropdown('to',$toUsers,$toUserSelected); ?>
In the last: <?php echo form::dropdown('since',array('-'=>'---','1d'=>'1 day','1w'=>'1 week','30d'=>'30 days'),$since); ?>
Order by:
<?php echo form::dropdown('orderby',array('from'=>'from,to','to'=>'to,from','pluscount'=>'plus count','minuscount'=>'minus count'),$orderBy); ?>
<?php echo form::dropdown('direction',array('asc'=>'ascending','desc'=>'descending'),$direction); ?>
<?php echo form::submit('go','Go'); ?>
<?php echo form::close(); ?>
<table border="1">
<tr><th>From</th><th>To</th><th>+</th><th>-</th></tr>
<?php foreach ($resultSet as $row) { ?>
<tr>
	<td><?php echo $fromUserSelected=='*'?'*':$row->from; ?></td>
	<td><?php echo $toUserSelected=='*'?'*':$row->to; ?></td>
	<td><?php echo $row->pluscount; ?></td>
	<td><?php echo $row->minuscount; ?></td>
</tr>
<?php } ?>
</table>